package com.fruit.constants;

/**
 * 
 * @ClassName: LightPayConstant
 * @author 葛欢欢
 * @version 2017.11.30 16:40
 */
public class LightPayConstant {
	/**
	 * 
	 * @ClassName: ServiceState
	 * @author 葛欢欢
	 * @version 2017.11.30 16:40
	 */
	public enum ServiceState {
		update("00"), handelOrder("01"), updateHandel("02");
		String value;

		ServiceState(String value) {
			this.value = value;
		}

		/**
		 * 
		 * @author 葛欢欢
		 * @version 2017.11.30 16:40
		 * @return String
		 */
		public String getValue() {
			return value;
		}

		/**
		 * 
		 * @author 葛欢欢
		 * @version 2017.11.30 16:40
		 * @param value
		 *            value
		 */
		public void setValue(String value) {
			this.value = value;
		}
	}

	/**
	 * 支付渠道 fruit-farm-common
	 *
	 * @author admin
	 * @version 2018年3月21日
	 *
	 */
	public enum ChannelType {
		H5("H5"), WAP("WAP"), APP("APP");
		String value;

		ChannelType(String value) {
			this.value = value;
		}

		public String getValue() {
			return value;
		}

		public void setValue(String value) {
			this.value = value;
		}

		public boolean equals(String value) {
			return this.value.equals(value);
		}
		
		public static boolean isExists(String value) {
			try {
				ChannelType.valueOf(value);
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}

}
